package day08;

/**
 * 矩形子类
 */
public class Rect extends Shape {

	private int l;
	private int w;

	
	public Rect() {
		super();
	}

	public int getL() {
		return l;
	}

	public void setL(int l) {
		this.l = l;
	}

	public int getW() {
		return w;
	}

	public void setW(int w) {
		this.w = w;
	}

	public Rect(int l, int w) {
		super();
		this.l = l;
		this.w = w;
	}

	@Override
	public double calcArea() {
		return l * w;
	}

	@Override
	public double calcLength() {
		return 2 * (l + w);
	}
}